home *** CD-ROM | disk | FTP | other *** search
-
- Program listing
-
- Function ReallyCast9(inputnumber: integer):integer;
- var
- total:integer;
- begin
- if inputnumber > 9 then
- begin
- total:=0;
- while (inputnumber >0)do
- begin
- total:=total+(inputnumber mod 10);
- if total >9then
- total:=total-9;
- inputnumber:=inputnumber div 10;
- end;
- end
- else
- total:=inputnumber;
- ReallyCast9:=total;
- end;
-
-
-
-
-
-
-